package cn.hxzy.course.mapper;

import cn.hxzy.common.domain.UserClass;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserClassMapper extends BaseMapper<UserClass> {
    //查此学生是哪个班的
    @Select("select class_id from sys_user_class where user_id=#{userId}")
    Integer selectClassIdByUserId(Long userId);


    @Update("update sys_user_class set class_id=#{classId} where user_id=#{userId}")
    Integer updateClassIdByUserId(Integer userId,Integer classId);
}
